package com.aiatomic.couting.widgets;

import java.util.ArrayList;
import java.util.List;

import com.aiatomic.couting.scan.ScanDrawable;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.FontMetricsInt;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;

public class ROIView extends View {



	public ROIView(Context context, AttributeSet attrs) {
		super(context, attrs);
		// TODO Auto-generated constructor stub
	}

	public ROIView(Context context) {
		super(context);
		// TODO Auto-generated constructor stub
	}

	public ROIView(Context context, AttributeSet attrs, int defStyleAttr) {
		super(context, attrs, defStyleAttr);
	}

	protected void onSizeChanged(int width, int height, int oldWidth, int oldHeight) {
		super.onSizeChanged(width, height, oldWidth, oldHeight);
		Log.d("count app", "ROIView size changed to " + width + " * " + height);
		if (width > 0) {
		}
	}

	@Override
	protected void onDraw(Canvas canvas) {
		super.onDraw(canvas);
	/*	int i = 1;
		for (ScanDrawable scan : drawables) {
			if (scan.sensitive < sensitive_min) {
				continue;
			}
			mPaint.setColor(Color.GRAY);
			mPaint.setAlpha(100);
			canvas.drawCircle(scan.x, scan.y, (scan.width*tag_size_scale) / 2, mPaint);
			if (show_num) {
				mPaint.setColor(Color.RED);
				mPaint.setTextAlign(Paint.Align.CENTER);
				mPaint.setAlpha(150);
				mPaint.setTextSize((int) (scan.width * 0.8*tag_size_scale));
				FontMetricsInt fontMetrics = mPaint.getFontMetricsInt();
				int baseline = (fontMetrics.bottom + fontMetrics.top) / 2;
				canvas.drawText(String.valueOf(i), scan.x, scan.y - baseline, mPaint);
			}
			i++;
		}*/
		//canvas.setMatrix(matrix);
	}

}
